home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / Source / MultiSession 1.04 Source / Core 27⁄June⁄1993 / CImagePane.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-02  |  725 b   |  28 lines  |  [TEXT/KAHL]

  1. /* CImagePane.c */
  2.  
  3. #include "CImagePane.h"
  4. #include "CWindow.h"
  5.  
  6.  
  7. void        CImagePane::IImagePane(LongPoint Start, LongPoint Extent, CWindow* TheWindow,
  8.                     CEnclosure* TheEnclosure, short ThePictID)
  9.     {
  10.         PictID = ThePictID;
  11.         IViewRect(Start,Extent,TheWindow,TheEnclosure);
  12.     }
  13.  
  14.  
  15. void        CImagePane::DoUpdate(void)
  16.     {
  17.         PicHandle        Image;
  18.  
  19.         SetUpPort();
  20.         ERROR(ResLoad == 0,PRERR(ForceAbort,"Automatic resource loading is disabled."));
  21.         Image = (PicHandle)GetResource('PICT',PictID);
  22.         ERROR(Image==NIL,PRERR(ForceAbort,"'PICT' resource not present."));
  23.         ERROR(ResErr != noErr,PRERR(ForceAbort,"Resource Error occurred."));
  24.         HLock((Handle)Image);
  25.         Window->LDrawPicture(Image,ZeroPoint,Extent);
  26.         HUnlock((Handle)Image);
  27.     }
  28.